﻿using System.Net;

namespace VirtualKeyboard.Service.TcpServices
{
    public sealed class TcpContext
    {
        public TcpRequest Request { get; internal set; }
        public TcpResponse Response { get; internal set; }

        internal TcpContext()
        {
            Request = new TcpRequest();
            Response = new TcpResponse();
        }
    }

    public sealed class TcpRequest
    {
        public IPEndPoint EndPoint { get; internal set; }
        public int Length { get; internal set; }
        public string Action { get; internal set; }
        public string Context { get; internal set; }
    }

    public sealed class TcpResponse
    {
        public int StateCode { get; set; }
        public string Context { get; set; }
    }

    public interface  ITcpContextHandler
    {
        void ProcessRequest(TcpContext context);
    }
    
}
